package com.ross.pojo;

import java.io.Serializable;

public class SysUsers implements Serializable {
    private Long id;//用户编号

    private String username;//用户名

    private String password;//密码

    private String salt;//盐

    private String roleId;//角色列表

    private Boolean locked = Boolean.FALSE; //是否锁定

    private static final long serialVersionUID = 1L;

    public SysUsers() {
    }

    public SysUsers(String username, String password) {
        this.username = username;
        this.password = password;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username == null ? null : username.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt == null ? null : salt.trim();
    }

    public String getCredentialsSalt() {
        return username + salt;
    }
    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId == null ? null : roleId.trim();
    }

    public Boolean getLocked() {
        return locked;
    }

    public void setLocked(Boolean locked) {
        this.locked = locked;
    }
}